﻿using System;
namespace Tempuri.Org.ListTypes {
    
    
    public class SimpleListType : Xtee.CoreTypes.ListTypeBase<global::Tempuri.Org.ListTypes.SizeType> {
        
        public SimpleListType(string value) : 
                base(value) {
            this.Validate();
        }
        
        public SimpleListType() : 
                base(new System.Collections.Generic.List<global::Tempuri.Org.ListTypes.SizeType>()) {
        }
        
        public SimpleListType(System.Collections.Generic.IList<global::Tempuri.Org.ListTypes.SizeType> value) : 
                base(value) {
            this.Validate();
        }
        
        public static bool TryParse(string value, out global::Tempuri.Org.ListTypes.SimpleListType result) {
            try {
                result = new global::Tempuri.Org.ListTypes.SimpleListType(value);
                return true;
            }
            catch (System.Exception ex) {
                result = null;
                return false;
            }
        }
        
        public static global::Tempuri.Org.ListTypes.SimpleListType Parse(string value) {
            global::Tempuri.Org.ListTypes.SimpleListType _SimpleListType = null;
            if (global::Tempuri.Org.ListTypes.SimpleListType.TryParse(value,out _SimpleListType)) {
                return new SimpleListType(_SimpleListType);
            }
             throw new FormatException("Cannot parse to type [global::Tempuri.Org.ListTypes.SimpleListType] from string value : [" + value + "]");;
        }
        
        public override global::Tempuri.Org.ListTypes.SizeType ParseElement(string value) {
            return new global::Tempuri.Org.ListTypes.SizeType(value);
        }
    }
}
